<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<div id="taskIdentityModal" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
	<div class="modal-dialog modal-lg">
		<div class="modal-content">
			<form class="form-horizontal" name="taskIdentityForm" ng-submit="addTaskIdentity()">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-label="Close">
						<span aria-hidden="true">&times;</span>
					</button>
					<h4 class="modal-title">
						<i class="mark"></i> 
						<span>新增修改执行端实例</span>
					</h4>
				</div>
				<div class="modal-body">
					<div class="form-group has-feedback" ng-class="{'has-error' : taskIdentityForm.name.$invalid && taskIdentityForm.name.$dirty, 
						'has-warning': taskIdentityForm.name.$invalid && !taskIdentityForm.name.$dirty}">
						<label class="col-md-3 control-label control-label-sm necessary-option">标识别名:</label>
						<div class="col-md-8">
							<input type="text" class="form-control input-sm" ng-model="taskIdentityVO.name" name="name" ng-required="true"/>
							<span class="glyphicon glyphicon-remove form-control-feedback" aria-hidden="true"
								ng-show="taskIdentityForm.name.$invalid && taskIdentityForm.name.$dirty"></span>
							<span class="glyphicon glyphicon-warning-sign form-control-feedback" aria-hidden="true"
								ng-show="taskIdentityForm.name.$invalid && !taskIdentityForm.name.$dirty"></span>
						</div>
					</div>
						
					<div class="form-group has-feedback" ng-class="{'has-error' : taskIdentityForm.identity.$invalid && taskIdentityForm.identity.$dirty, 
						'has-warning': taskIdentityForm.identity.$invalid && !taskIdentityForm.identity.$dirty}">
						<label class="col-md-3 control-label control-label-sm necessary-option">执行端标识:</label>
						<div class="col-md-8">
							<input type="text" class="form-control input-sm" ng-model="taskIdentityVO.identity" 
								name="identity" ng-pattern="/^ID(_\w+)+(_\d+)*$/" ng-required="true" 
								placeholder="格式：ID_应用名_模块名_序号(序号可忽略不填)"/>
							<span class="glyphicon glyphicon-remove form-control-feedback" aria-hidden="true"
								ng-show="taskIdentityForm.identity.$invalid && taskIdentityForm.identity.$dirty"></span>
							<span class="glyphicon glyphicon-warning-sign form-control-feedback" aria-hidden="true"
								ng-show="taskIdentityForm.identity.$invalid && !taskIdentityForm.identity.$dirty"></span>
						</div>
					</div>
					
					<div class="form-group has-feedback">
						<div ng-class="{'has-error' : taskIdentityForm.batchThreadNum.$invalid && taskIdentityForm.batchThreadNum.$dirty, 
								'has-warning': taskIdentityForm.batchThreadNum.$invalid && !taskIdentityForm.batchThreadNum.$dirty}">
							<label class="col-md-3 control-label control-label-sm">业务数据线程池大小:</label>
							<div class="col-md-3">
								<input type="number" class="form-control input-sm" name="batchThreadNum" ng-model="taskIdentityVO.batchThreadNum"
									ng-pattern="/^([1-9]\d{0,2}|1000)$/" placeholder="1~1000之间的整数" /> 
								<span class="glyphicon glyphicon-remove form-control-feedback" aria-hidden="true"
									ng-show="taskIdentityForm.batchThreadNum.$invalid && taskIdentityForm.batchThreadNum.$dirty"></span>
							</div>
						</div>
						
						<div ng-class="{'has-error' : taskIdentityForm.threadNum.$invalid && taskIdentityForm.threadNum.$dirty, 
								'has-warning': taskIdentityForm.threadNum.$invalid && !taskIdentityForm.threadNum.$dirty}">
							<label class="col-md-2 control-label control-label-sm">线程池大小:</label>
							<div class="col-md-3">
								<input type="number" class="form-control input-sm" name="threadNum" ng-model="taskIdentityVO.threadNum" 
									ng-pattern="/^([1-9]\d{0,2}|1000)$/" placeholder="1~1000之间的整数" /> 
								<span class="glyphicon glyphicon-remove form-control-feedback" aria-hidden="true"
									ng-show="taskIdentityForm.threadNum.$invalid && taskIdentityForm.threadNum.$dirty"></span>
							</div>
						</div>
					</div>
					
					
					<div class="form-group  has-feedback" ng-class="{'has-error' : taskIdentityForm.threadPriorityWeight.$invalid && taskIdentityForm.threadPriorityWeight.$dirty, 
								'has-warning': taskIdentityForm.threadPriorityWeight.$invalid && !taskIdentityForm.threadPriorityWeight.$dirty}">
						<label class="col-md-3 control-label control-label-sm">任务优先级权重:</label>
						<div class="col-md-8">
							<input type="text" class="form-control input-sm" name="threadPriorityWeight" ng-model="taskIdentityVO.threadPriorityWeight"
								ng-pattern="/^([1-5]:([1-9]\d{0,1}|100);){0,5}$/" placeholder="格式：1:20;2:30;3:30;4:10;5:20;" />
							<span class="glyphicon glyphicon-remove form-control-feedback" aria-hidden="true"
									ng-show="taskIdentityForm.threadNum.$invalid && taskIdentityForm.threadNum.$dirty"></span>
						</div>
					</div>

					<div class="form-group  has-feedback" ng-class="{'has-error' : taskIdentityForm.batchThreadPriorityWeight.$invalid && taskIdentityForm.batchThreadPriorityWeight.$dirty, 
								'has-warning': taskIdentityForm.batchThreadPriorityWeight.$invalid && !taskIdentityForm.batchThreadPriorityWeight.$dirty}">
						<label class="col-md-3 control-label control-label-sm">任务业务数据优先级权重:</label>
						<div class="col-md-8">
							<input type="text" class="form-control input-sm" name="batchThreadPriorityWeight" ng-model="taskIdentityVO.batchThreadPriorityWeight"
								ng-pattern="/^([1-5]:([1-9]\d{0,1}|100);){0,5}$/" placeholder="格式：1:20;2:30;3:30;4:10;5:20;" /> 
							<span class="glyphicon glyphicon-remove form-control-feedback" aria-hidden="true"
									ng-show="taskIdentityForm.batchThreadPriorityWeight.$invalid && taskIdentityForm.batchThreadPriorityWeight.$dirty"></span>
						</div>
					</div>
					
					<div class="form-group">
						<label class="col-md-3 control-label control-label-sm">描述说明:</label>
						<div class="col-md-8">
							<textarea rows="5" cols="77" ng-model="taskIdentityVO.description"></textarea>
						</div>
					</div>
				</div>
				<div class="modal-footer">
					<div class="modal-footer-button">
						<button type="button" class="btn btn-sm btn-default" data-dismiss="modal">取消</button>
						<button type="submit" class="btn btn-sm btn-blue">确认</button>
					</div>
				</div>
			</form>
		</div>
	</div>
</div>
